﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Chat
{
    /// <summary>
    /// Interaction logic for UserControlMessageReceived.xaml
    /// </summary>
    public partial class UserControlMessageReceived : UserControl, IUserControlMessage
    {
        public UserControlMessageReceived()
        {
            InitializeComponent();
            Text.Text = "";
            Time.Text = "";
        }
        public UserControlMessageReceived(string text, DateTime time)
        {
            InitializeComponent();
            Text.Text = text;
            Time.Text = (DateTime.Now - time) >= TimeSpan.FromDays(1) ?
                time.ToString("M.d H:m") :
                time.ToString("H:m");
        }

        private void Copy_Click(object sender, RoutedEventArgs e)
        {

        }
        private void SelectAll_Click(object sender, RoutedEventArgs e)
        {

        }
        private void Reply_Click(object sender, RoutedEventArgs e)
        {
        }
    }
}